<?php
include_once '../AtacCommunicator/ACBusWaitingTimes.php';
include_once '../Exceptions/CommunicationException.php';
include_once '../InfoManager/InfoManager.php';
include_once '../Model/BusStop.php';
include_once '../Model/Location.php';
include_once '../Model/Address.php';
include_once '../Model/GPS.php';


	if ((isset($_GET["busLine"])) && (isset($_GET["pathID"])) && (isset($_GET["stopID"])))
	{
		try {
			
			
			$referenceStop = new BusStop(null, RMobUtils::escape_var($_GET["stopID"]));

			$busLine = new BusLine(RMobUtils::escape_var($_GET["busLine"]));
			
//($line, $referenceBusStop, $stopsLeft, $timeLeft, $currentPathID=null, $departureTime=null)
			$bus = new BusAtStop($busLine,$referenceStop,"","",RMobUtils::escape_var($_GET["pathID"]),"");
			
			
			//extended mode
			echo $bus->toXML(EXTENDED_MODE);
			
			}
		catch (Exception $e) {
			echo $e->toXML(EXTENDED_MODE);
		}
	}

?>